<?php
class Duda extends AppModel {
	var $name = 'Duda';
	var $useTable = 'dudas';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'curso_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'pregunta' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'fecha_pregunta' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		)
	);

	var $belongsTo = array(
		'Curso' => array(
			'className' => 'Curso',
			'foreignKey' => 'curso_id'
		)
	);
}
?>